/* 字体导入 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

/* 打字机光标动画 */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* 占位符旋转动画 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 扁平化设计CSS变量 */
:root {
  /* 扁平化主色调 - 柔和蓝色 */
  --color-primary-50: #f0f9ff;
  --color-primary-100: #e0f2fe;
  --color-primary-200: #bae6fd;
  --color-primary-300: #7dd3fc;
  --color-primary-400: #38bdf8;
  --color-primary-500: #0ea5e9;
  --color-primary-600: #0284c7;
  --color-primary-700: #0369a1;
  --color-primary-800: #075985;
  --color-primary-900: #0c4a6e;
  
  /* 扁平化灰色系 */
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;
  
  /* 扁平化彩色 */
  --color-green-400: #4ade80;
  --color-green-500: #22c55e;
  --color-red-400: #f87171;
  --color-red-500: #ef4444;
  --color-orange-400: #fb923c;
  --color-orange-500: #f97316;
  --color-purple-400: #c084fc;
  --color-purple-500: #a855f7;
  --color-teal-400: #2dd4bf;
  --color-teal-500: #14b8a6;
  
  /* 扁平化阴影 */
  --shadow-flat-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-flat-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-flat-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  
  /* 扁平化圆角 */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* 基础样式重置 */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  font-family: 'Inter', 'PingFang SC', 'Source Han Sans', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  font-variation-settings: 'opsz' 32;
  background: #f8fafc;
  color: var(--color-gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 扁平化设计全局样式覆盖 */
.ant-layout {
  background: #f8fafc !important;
}

.ant-layout-sider {
  background: #ffffff !important;
  border-right: none !important;
  box-shadow: none !important;
}

.ant-layout-content {
  background: #f8fafc !important;
}

/* 去除会话页面多余边框 */
.conversation-page .ant-layout {
  border: none !important;
}

.conversation-page .ant-layout-sider {
  border: none !important;
  box-shadow: var(--shadow-flat-md);
}

.conversation-page .ant-layout-content {
  border: none !important;
}

/* 客户列表样式优化 */
.ant-list {
  border: none !important;
  background: transparent !important;
}

.ant-list-item {
  border: none !important;
  border-bottom: none !important;
  padding: 0 !important;
}

/* 聊天头部样式优化 */
.chat-header {
  border-bottom: 1px solid var(--color-gray-200) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

/* 消息气泡样式优化 */
.message-bubble {
  border: none !important;
  box-shadow: var(--shadow-flat-sm) !important;
  border-radius: var(--radius-lg) !important;
}

.message-bubble.advisor {
  background: var(--color-primary-50) !important;
  border: 1px solid var(--color-primary-200) !important;
}

.message-bubble.client {
  background: #ffffff !important;
  border: 1px solid var(--color-gray-200) !important;
}

/* 输入区域样式优化 */
.chat-input-area {
  border-top: 1px solid var(--color-gray-200) !important;
  background: #ffffff !important;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* 扁平化卡片样式 */
.ant-card {
  border-radius: var(--radius-lg) !important;
  border: none !important;
  box-shadow: var(--shadow-flat-sm) !important;
  background: #ffffff !important;
}

.ant-card:hover {
  box-shadow: var(--shadow-flat-md) !important;
  transform: none !important;
  transition: box-shadow 0.2s ease !important;
}

.ant-card-head {
  border-bottom: 1px solid var(--color-gray-200) !important;
  background: #ffffff !important;
}

.ant-card-head-title {
  font-weight: 500 !important;
  color: var(--color-gray-800) !important;
}

.ant-card-body {
  border: none !important;
}

/* 扁平化按钮样式 */
.ant-btn {
  border-radius: var(--radius-md) !important;
  font-weight: 500 !important;
  border: none !important;
  box-shadow: none !important;
  height: auto !important;
  padding: 8px 16px !important;
  transition: all 0.2s ease !important;
}

.ant-btn-primary {
  background: var(--color-primary-500) !important;
  color: #ffffff !important;
}

.ant-btn-primary:hover {
  background: var(--color-primary-600) !important;
  transform: none !important;
}

.ant-btn-default {
  background: #ffffff !important;
  border: 1px solid var(--color-gray-300) !important;
  color: var(--color-gray-700) !important;
}

.ant-btn-default:hover {
  background: var(--color-gray-50) !important;
  border-color: var(--color-gray-400) !important;
}

.ant-btn-text {
  border: none !important;
  box-shadow: none !important;
}

/* 扁平化头像样式 */
.ant-avatar {
  border-radius: var(--radius-full) !important;
  border: none !important;
  box-shadow: var(--shadow-flat-sm) !important;
  font-weight: 500 !important;
}

/* 扁平化标签样式 */
.ant-tag {
  border-radius: var(--radius-md) !important;
  border: none !important;
  font-weight: 500 !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
}

.ant-tag-blue {
  background: rgba(14, 165, 233, 0.1) !important;
  color: var(--color-primary-700) !important;
}

.ant-tag-green {
  background: rgba(34, 197, 94, 0.1) !important;
  color: var(--color-green-500) !important;
}

.ant-tag-orange {
  background: rgba(249, 115, 22, 0.1) !important;
  color: var(--color-orange-500) !important;
}

.ant-tag-red {
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--color-red-500) !important;
}

.ant-tag-purple {
  background: rgba(168, 85, 247, 0.1) !important;
  color: var(--color-purple-500) !important;
}

.ant-tag-geekblue {
  background: rgba(14, 165, 233, 0.1) !important;
  color: var(--color-primary-600) !important;
}

.ant-tag-magenta {
  background: rgba(236, 72, 153, 0.1) !important;
  color: #ec4899 !important;
}

.ant-tag-gold {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #f59e0b !important;
}

/* 扁平化标签页样式 */
.ant-tabs {
  background: transparent !important;
}

.ant-tabs-tab {
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  border: none !important;
  font-weight: 500 !important;
  color: var(--color-gray-600) !important;
  margin-right: 8px !important;
  padding: 12px 20px !important;
}

.ant-tabs-tab:hover {
  color: var(--color-primary-600) !important;
  background: var(--color-primary-50) !important;
}

.ant-tabs-tab-active {
  color: var(--color-primary-600) !important;
  background: #ffffff !important;
  border-bottom: 2px solid var(--color-primary-500) !important;
}

.ant-tabs-ink-bar {
  background: var(--color-primary-500) !important;
  height: 2px !important;
}

.ant-tabs-content-holder {
  background: #ffffff !important;
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg) !important;
  border: none !important;
}

.ant-tabs-content {
  border: none !important;
}

.ant-tabs-tabpane {
  border: none !important;
}

/* 扁平化进度条样式 */
.ant-progress-circle .ant-progress-text {
  font-weight: 600 !important;
  color: var(--color-gray-800) !important;
}

.ant-progress-line .ant-progress-bg {
  border-radius: var(--radius-full) !important;
}

/* 扁平化输入框样式 */
.ant-input, .ant-input-affix-wrapper {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--color-gray-300) !important;
  box-shadow: none !important;
  padding: 8px 12px !important;
}

.ant-input:focus, .ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-focused {
  border-color: var(--color-primary-500) !important;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1) !important;
}

/* 扁平化描述列表样式 */
.ant-descriptions {
  border: none !important;
}

.ant-descriptions-item {
  border: none !important;
}

.ant-descriptions-item-label {
  font-weight: 500 !important;
  color: var(--color-gray-700) !important;
}

.ant-descriptions-item-content {
  color: var(--color-gray-900) !important;
}

/* 扁平化分割线样式 */
.ant-divider {
  border-color: var(--color-gray-200) !important;
  margin: 16px 0 !important;
}

/* 扁平化统计数值样式 */
.ant-statistic-title {
  font-weight: 500 !important;
  color: var(--color-gray-600) !important;
  font-size: 14px !important;
}

.ant-statistic-content {
  font-weight: 600 !important;
  color: var(--color-gray-900) !important;
}

/* 客户列表扁平化样式 */
.customer-list-item {
  padding: 16px !important;
  border-radius: var(--radius-lg) !important;
  margin-bottom: 8px !important;
  background: #ffffff !important;
  border: none !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  box-shadow: var(--shadow-flat-sm) !important;
}

.customer-list-item:hover {
  background: var(--color-gray-50) !important;
  box-shadow: var(--shadow-flat-md) !important;
}

.customer-list-item.active {
  background: var(--color-primary-50) !important;
  box-shadow: var(--shadow-flat-md) !important;
}

/* 右侧面板边框优化 */
.right-panel {
  border-left: none !important;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.06) !important;
}

/* 徽章样式优化 */
.ant-badge {
  border: none !important;
}

.ant-badge-count {
  border: none !important;
  box-shadow: var(--shadow-flat-sm) !important;
}

/* 滚动条扁平化样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

/* Tabs高度修复 */
.ant-tabs.h-full {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.ant-tabs.h-full .ant-tabs-content-holder {
  flex: 1;
  overflow: hidden;
}

.ant-tabs.h-full .ant-tabs-tabpane {
  height: 100%;
  overflow-y: auto;
}

/* Spin 加载组件样式优化 */
.ant-spin {
  border: none !important;
}

.ant-spin-container {
  border: none !important;
}

/* 空状态样式优化 */
.ant-empty {
  border: none !important;
}

/* 响应式扁平化样式 */
@media (max-width: 768px) {
  .ant-card {
    margin: 8px !important;
    border-radius: var(--radius-md) !important;
  }
  
  .customer-list-item {
    margin-bottom: 4px !important;
    padding: 12px !important;
  }
}

/* 客户卡片列表样式 */
.customer-cards-container {
  width: 100%;
  padding: 8px 16px;
  background: 
    radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  background-size: 400px 400px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
}

.customer-cards-container::-webkit-scrollbar {
  width: 8px;
}

.customer-cards-container::-webkit-scrollbar-track {
  background: rgba(248, 250, 252, 0.5);
  border-radius: 12px;
  margin: 8px 0;
}

.customer-cards-container::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
  border-radius: 12px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: all 0.3s ease;
}

.customer-cards-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(139, 92, 246, 0.5));
  background-clip: content-box;
}

.customer-info-card {
  border-radius: 12px !important;
  border: 1px solid #f1f5f9 !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  background: #ffffff !important;
  position: relative !important;
  overflow: hidden !important;
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(10px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.customer-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* .customer-info-card:hover {
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-6px) scale(1.02) !important;
}

.customer-info-card:hover::before {
  opacity: 1;
} */

.customer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.customer-avatar-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-avatar {
  border: 3px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.3s ease !important;
  position: relative !important;
}



/* .customer-info-card:hover .customer-avatar {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1) !important;
} */

.customer-basic-info {
  flex: 1;
}

.customer-name {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.customer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.customer-tags .tag-small {
  font-size: 11px !important;
  padding: 4px 10px !important;
  height: 24px !important;
  line-height: 16px !important;
  border-radius: 12px !important;
  border: none !important;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%) !important;
  color: #3730a3 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1) !important;
}

.customer-status {
  text-align: right;
}

.status-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.status-date {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  padding: 4px 8px;
  background: rgba(75, 85, 99, 0.05);
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.unread-badge {
  display: inline-block;
  position: relative;
}

.unread-count {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 16px;
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3), 0 1px 3px rgba(239, 68, 68, 0.4);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3), 0 1px 3px rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.4), 0 1px 4px rgba(239, 68, 68, 0.5);
  }
}

.kyc-summary {
  margin-bottom: 16px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.kyc-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #3b82f6;
}

.kyc-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kyc-content {
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 8px;
  font-weight: 500;
}

.kyc-more {
  text-align: right;
}

.kyc-more span {
  font-size: 11px;
  color: #3b82f6;
  cursor: pointer;
}

.kyc-more span:hover {
  text-decoration: underline;
}

.clue-info {
  margin-bottom: 16px;
  padding: 12px;
  background: #f0f9ff;
  border-radius: 8px;
  border: 1px solid #bae6fd;
  position: relative;
  overflow: hidden;
}

.clue-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #06b6d4;
}

.clue-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.clue-content {
  font-size: 12px;
  color: #0c4a6e;
  margin-bottom: 8px;
  font-weight: 600;
  background: rgba(6, 182, 212, 0.1);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.clue-more {
  text-align: right;
}

.clue-more span {
  font-size: 11px;
  color: #0ea5e9;
  cursor: pointer;
}

.clue-more span:hover {
  text-decoration: underline;
}

.customer-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.action-btn {
  flex: 1 !important;
  height: 32px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.call-btn {
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  background: #f8fafc !important;
}

.call-btn:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.im-btn {
  background: #3b82f6 !important;
  border: 1px solid #3b82f6 !important;
  color: white !important;
}

.im-btn:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
}

.waiting-time-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid #f3f4f6;
}

.waiting-time {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  padding: 3px 8px;
  background: rgba(100, 116, 139, 0.08);
  border-radius: 6px;
}

.priority-star {
  color: #ef4444;
  font-size: 14px;
  animation: sparkle 2s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(239, 68, 68, 0.3));
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    opacity: 0.8;
  }
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 2px dashed #cbd5e1;
  margin: 20px 0;
}

.empty-state::before {
  content: '👥';
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.6;
}

.customer-summary {
  text-align: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-radius: 8px;
  margin: 16px 16px 0 16px;
  font-weight: 600;
  color: #475569;
  border-top: 2px solid rgba(59, 130, 246, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .customer-info-card {
    margin-bottom: 16px;
  }
  
  .customer-info-card .ant-card-body {
    padding: 20px !important;
  }
  
  .customer-cards-container {
    flex: 1;
  }
  
  .customer-cards-container::-webkit-scrollbar {
    width: 6px;
  }
  
  .customer-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .customer-avatar-section {
    flex-direction: row;
  }
  
  .customer-status {
    text-align: left;
  }
  
  .status-section {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  
  .customer-actions {
    flex-direction: row;
  }
  
  .action-btn {
    height: 38px !important;
    font-size: 14px !important;
  }
  
  .customer-info-card {
    border-radius: 14px !important;
  }
  
  /* .customer-info-card:hover {
    transform: translateY(-3px) scale(1.01) !important;
  } */
}

@media (max-width: 576px) {
  .customer-cards-container {
    padding: 8px 12px;
    flex: 1;
  }
  
  .customer-cards-container::-webkit-scrollbar {
    width: 4px;
  }
  
  .customer-info-card .ant-card-body {
    padding: 18px !important;
  }
  
  .customer-name {
    font-size: 14px;
  }
  
  .kyc-content,
  .clue-content {
    font-size: 11px;
  }
}

/* 对话页面特定样式 */
.conversation-page .ant-layout-sider {
  border: none !important;
  box-shadow: var(--shadow-flat-md);
}

.conversation-page .customer-list-item {
  border: none !important;
  box-shadow: var(--shadow-flat-sm);
  margin-bottom: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.conversation-page .customer-list-item:hover {
  box-shadow: var(--shadow-flat-md);
}

.conversation-page .customer-list-item.active {
  background: linear-gradient(to right, #eff6ff, #dbeafe);
  box-shadow: var(--shadow-flat-md);
}

.conversation-page .chat-header {
  border-bottom: none !important;
  box-shadow: var(--shadow-flat-sm);
}

.conversation-page .message-bubble {
  border: none !important;
}

.conversation-page .chat-input-area {
  border-top: none !important;
  box-shadow: var(--shadow-flat-sm);
}

.conversation-page .right-panel {
  border-left: none !important;
  box-shadow: var(--shadow-flat-md);
}

/* 资产配置页面搜索框样式 */
.asset-allocation-search .ant-input-search {
  border: none !important;
  box-shadow: var(--shadow-flat-sm);
  border-radius: var(--radius-md);
  background: var(--color-gray-50);
  transition: all 0.2s ease;
}

.asset-allocation-search .ant-input-search:hover {
  box-shadow: var(--shadow-flat-md);
  background: #ffffff;
}

.asset-allocation-search .ant-input-search-button {
  border: none !important;
  box-shadow: none !important;
  background: var(--color-primary-500) !important;
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
  color: #ffffff !important;
}

.asset-allocation-search .ant-input-search-button:hover {
  background: var(--color-primary-600) !important;
}

.asset-allocation-search .ant-input {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 14px;
  padding: 8px 12px !important;
}

.asset-allocation-search .ant-input:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.asset-allocation-search .ant-input:placeholder-shown {
  color: var(--color-gray-400) !important;
}

.asset-allocation-search .ant-input-group-addon {
  border: none !important;
  background: transparent !important;
}

/* Analytics tabs 样式 */
.analytics-tabs .ant-tabs-content-holder {
  height: calc(100vh - 120px);
  overflow: hidden;
}

.analytics-tabs .ant-tabs-tabpane {
  padding: 0;
  margin: 0;
  height: 100%;
  overflow: hidden;
}

.analytics-tabs .ant-tabs-content {
  height: 100%;
}

/* 右侧面板Tab样式优化 */
.conversation-page .right-panel .ant-tabs {
  height: 100%;
}

.conversation-page .right-panel .ant-tabs-tab {
  padding: 6px 8px !important;
  margin: 0 1px !important;
  font-size: 12px !important;
  border: none !important;
  background: transparent !important;
  border-radius: 6px 6px 0 0 !important;
  min-width: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.conversation-page .right-panel .ant-tabs-tab:hover {
  background: #f0f0f0 !important;
}

.conversation-page .right-panel .ant-tabs-tab-active {
  background: #ffffff !important;
  color: var(--color-primary-600) !important;
  box-shadow: var(--shadow-flat-sm) !important;
  font-weight: 600 !important;
}

.conversation-page .right-panel .ant-tabs-tab-icon {
  margin-right: 3px !important;
  font-size: 12px !important;
}

.conversation-page .right-panel .ant-tabs-tab .ant-tabs-tab-btn {
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-align: center !important;
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.conversation-page .right-panel .ant-tabs-nav {
  margin-bottom: 0 !important;
  background: #f8f9fa !important;
  padding: 4px 4px 0 4px !important;
  border-radius: 8px 8px 0 0 !important;
}

.conversation-page .right-panel .ant-tabs-nav-list {
  width: 100% !important;
  display: flex !important;
}

.conversation-page .right-panel .ant-tabs-nav-wrap {
  overflow: visible !important;
}

.conversation-page .right-panel .ant-tabs-ink-bar {
  display: none !important;
}

.conversation-page .right-panel .ant-tabs-content-holder {
  height: calc(100% - 40px) !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

.conversation-page .right-panel .ant-tabs-content {
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.conversation-page .right-panel .ant-tabs-tabpane {
  height: 100% !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 移除Tab内容的默认padding */
.conversation-page .right-panel .ant-tabs-tabpane > div {
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 统一移除所有Tab页面的底部留白 */
.conversation-page .right-panel .ant-tabs-tabpane .h-full {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* 资产配置页面特定优化 - 移除底部间距 */
.conversation-page .right-panel .ant-tabs-tabpane .h-20 {
  display: none !important;
}

/* 客户画像页面底部留白移除 */
.conversation-page .right-panel .ant-tabs-tabpane .bg-gray-50 {
  padding-bottom: 0 !important;
}

/* 营销页面底部留白移除 */
.conversation-page .right-panel .ant-tabs-tabpane .overflow-y-auto {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* 通用底部留白移除 */
.conversation-page .right-panel .ant-tabs-tabpane > div > div:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* AI Copilot页面底部固定区域调整 */
.conversation-page .right-panel .ant-tabs-tabpane .flex-shrink-0:last-child {
  margin-bottom: 0 !important;
}

/* 强制移除任何底部空间 */
.conversation-page .right-panel .ant-tabs-tabpane .space-y-4:last-child,
.conversation-page .right-panel .ant-tabs-tabpane .space-y-3:last-child,
.conversation-page .right-panel .ant-tabs-tabpane .space-y-2:last-child {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* 更精确的底部留白移除 */
.conversation-page .right-panel .ant-tabs-tabpane {
  position: relative !important;
}

.conversation-page .right-panel .ant-tabs-tabpane::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 移除所有内容的底部外边距和内边距 */
.conversation-page .right-panel .ant-tabs-tabpane * {
  margin-bottom: 0 !important;
}

/* 恢复特定组件间的必要间距 */
.conversation-page .right-panel .ant-tabs-tabpane .space-y-4 > * + *,
.conversation-page .right-panel .ant-tabs-tabpane .space-y-3 > * + *,
.conversation-page .right-panel .ant-tabs-tabpane .space-y-2 > * + * {
  margin-top: 1rem !important;
}

.conversation-page .right-panel .ant-tabs-tabpane .space-y-3 > * + * {
  margin-top: 0.75rem !important;
}

.conversation-page .right-panel .ant-tabs-tabpane .space-y-2 > * + * {
  margin-top: 0.5rem !important;
}

/* List组件边框移除 */
.ant-list {
  border: none !important;
}

.ant-list-item {
  border: none !important;
  border-bottom: none !important;
}

/* Badge组件边框移除 */
.ant-badge {
  border: none !important;
}

/* Spin组件边框移除 */
.ant-spin {
  border: none !important;
}

.ant-spin-container {
  border: none !important;
}

/* Empty组件边框移除 */
.ant-empty {
  border: none !important;
}

/* Dashboard 常用工具库按钮样式 */
.tools-button.ant-btn-primary {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

.tools-button.ant-btn-primary:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

.tools-button.ant-btn-primary:focus {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* 更精确的底部留白移除 - 强制所有Tab内容紧贴底部 */
.conversation-page .right-panel .ant-tabs-tabpane {
  position: relative !important;
  box-sizing: border-box !important;
}

/* 移除所有Tab页面底部的margin和padding */
.conversation-page .right-panel .ant-tabs-tabpane > div:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* 确保固定在底部的元素紧贴底部 */
.conversation-page .right-panel .ant-tabs-tabpane .flex-shrink-0 {
  margin-bottom: 0 !important;
}

/* 移除空的div元素造成的底部间距 */
.conversation-page .right-panel .ant-tabs-tabpane .h-20 {
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: none !important;
}

/* 营销场景卡片样式优化 */
.marketing-scenario-card {
  border-radius: var(--radius-md) !important;
  margin-bottom: 12px !important;
  box-shadow: var(--shadow-flat-sm) !important;
  transition: all 0.2s ease !important;
  overflow: hidden !important;
}

.marketing-scenario-card:hover {
  box-shadow: var(--shadow-flat-md) !important;
}

/* 推荐场景卡片 - 淡蓝色背景 */
.marketing-scenario-card.recommended {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

/* 普通场景卡片 */
.marketing-scenario-card.normal {
  background: #ffffff !important;
  border: 1px solid var(--color-gray-200) !important;
}

/* 卡片内容区域优化间距 */
.marketing-scenario-card .ant-card-body {
  padding: 14px !important;
}

/* 场景标题区域 */
.marketing-scenario-header {
  margin-bottom: 16px !important;
}

.marketing-scenario-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--color-gray-800) !important;
  line-height: 1.4 !important;
  margin-bottom: 6px !important;
}

.marketing-scenario-description {
  font-size: 12px !important;
  color: var(--color-gray-600) !important;
  line-height: 1.4 !important;
  margin-bottom: 8px !important;
}

/* 客户标签区域 */
.marketing-customer-tags {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
}

.marketing-customer-tags .ant-tag {
  font-size: 10px !important;
  padding: 2px 6px !important;
  margin: 2px 2px 2px 0 !important;
  border-radius: 4px !important;
}

/* 生成内容区域 */
.marketing-generated-content {
  margin-top: 16px !important;
  margin-bottom: 0 !important;
  padding: 12px !important;
  background: #ffffff !important;
  border-radius: 6px !important;
  border: 1px solid var(--color-gray-200) !important;
  box-shadow: var(--shadow-flat-sm) !important;
}

.marketing-content-header {
  margin-bottom: 8px !important;
}

.marketing-content-indicator {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  flex-shrink: 0 !important;
}

.marketing-content-label {
  font-size: 10px !important;
  color: #10b981 !important;
  font-weight: 500 !important;
}

.marketing-content-text {
  font-size: 12px !important;
  color: var(--color-gray-800) !important;
  line-height: 1.5 !important;
  white-space: pre-line !important;
}

/* 加载状态样式 */
.marketing-loading-state {
  margin-top: 16px !important;
  margin-bottom: 0 !important;
  padding: 10px 12px !important;
  background: #fef3c7 !important;
  border-radius: 6px !important;
  border: 1px solid #fbbf24 !important;
}

.marketing-loading-indicator {
  width: 14px !important;
  height: 14px !important;
  border: 2px solid #1d4ed8 !important;
  border-top-color: transparent !important;
  border-radius: 50% !important;
  animation: spin 1s linear infinite !important;
}

.marketing-loading-text {
  font-size: 11px !important;
  color: #1d4ed8 !important;
  margin-left: 8px !important;
}

/* 操作按钮区域 */
.marketing-actions {
  gap: 6px !important;
  margin-top: 16px !important;
  margin-bottom: 10px !important;
}

.marketing-actions .ant-btn {
  height: 28px !important;
  padding: 4px 12px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  border-radius: 4px !important;
}

.marketing-actions .ant-btn-primary {
  min-width: 80px !important;
}

.marketing-actions .ant-btn-sm {
  height: 26px !important;
  padding: 3px 10px !important;
  font-size: 11px !important;
}

/* 统计信息区域 */
.marketing-stats {
  margin-top: 10px !important;
  padding-top: 8px !important;
  border-top: 1px solid var(--color-gray-100) !important;
}

.marketing-stats-item {
  font-size: 10px !important;
  color: var(--color-gray-500) !important;
}

/* 不同数据类型的颜色 */
.marketing-data-usage {
  color: #6366f1 !important; /* 靛蓝色 - 使用次数 */
  font-weight: 500 !important;
}

.marketing-data-success {
  color: #10b981 !important; /* 绿色 - 成功率 */
  font-weight: 500 !important;
}

.marketing-data-priority {
  color: #f59e0b !important; /* 橙色 - 优先级 */
  font-weight: 500 !important;
}

.marketing-data-priority.high {
  color: #ef4444 !important; /* 红色 - 高优先级 */
  font-weight: 600 !important;
}

/* 推荐标签样式 */
.marketing-recommended-tag {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 500 !important;
  animation: pulse 2s ease-in-out infinite !important;
}

/* 热门标签样式 */
.marketing-popular-tag {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
  color: #ffffff !important;
  border: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* 产品推荐卡片样式优化 */
.asset-allocation-product-card {
  border: 1px solid var(--color-gray-200) !important;
  border-radius: var(--radius-md) !important;
  padding: 12px !important;
  margin-bottom: 8px !important;
  background: #ffffff !important;
  box-shadow: var(--shadow-flat-sm) !important;
  transition: all 0.2s ease !important;
}

.asset-allocation-product-card:hover {
  box-shadow: var(--shadow-flat-md) !important;
}

.asset-allocation-product-card.blue {
  background: rgba(59, 130, 246, 0.05) !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
}

.asset-allocation-product-card.green {
  background: rgba(34, 197, 94, 0.05) !important;
  border-color: rgba(34, 197, 94, 0.2) !important;
}

.asset-allocation-product-card .product-name {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--color-gray-800) !important;
  line-height: 1.4 !important;
  margin-bottom: 4px !important;
}

.asset-allocation-product-card .product-code {
  font-size: 11px !important;
  color: var(--color-gray-500) !important;
}

.asset-allocation-product-card .product-return {
  font-size: 11px !important;
  color: var(--color-gray-600) !important;
}

.asset-allocation-product-card .product-return-value {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #ef4444 !important; /* 红色收益 */
}

.asset-allocation-product-card .product-features {
  font-size: 11px !important;
  color: var(--color-gray-500) !important;
  line-height: 1.3 !important;
}

/* 会话页面产品卡片样式修复 */
.conversation-page .asset-allocation-product-card {
  background: #ffffff !important;
  border: 1px solid var(--color-gray-200) !important;
}

.conversation-page .asset-allocation-product-card .product-name {
  color: var(--color-gray-800) !important;
}

.conversation-page .asset-allocation-product-card .product-code {
  color: var(--color-gray-500) !important;
}

.conversation-page .asset-allocation-product-card .product-return {
  color: var(--color-gray-600) !important;
}

.conversation-page .asset-allocation-product-card .product-return-value {
  color: #ef4444 !important;
}

.conversation-page .asset-allocation-product-card .product-features {
  color: var(--color-gray-500) !important;
}

.conversation-page .asset-allocation-product-card .ant-btn {
  color: #ffffff !important;
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

.conversation-page .asset-allocation-product-card .ant-btn:hover {
  color: #ffffff !important;
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

.conversation-page .asset-allocation-product-card .ant-btn:focus {
  color: #ffffff !important;
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

/* AI助手功能开关样式 */
.ai-feature-enabled {
  color: var(--color-primary-600) !important;
}

.ai-feature-disabled {
  color: var(--color-gray-400) !important;
}

.ai-feature-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: var(--radius-md) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  font-size: 14px !important;
}

.ai-feature-icon.enabled {
  background: var(--color-primary-500) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-flat-sm) !important;
}

.ai-feature-icon.disabled {
  background: var(--color-gray-100) !important;
  color: var(--color-gray-400) !important;
  border: 1px solid var(--color-gray-200) !important;
}

.ai-feature-icon:hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow-flat-md) !important;
}

.ai-feature-tag {
  background: var(--color-primary-500) !important;
  color: #ffffff !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
  line-height: 1 !important;
}

/* AI助手输入区域底部间距 */
.ai-input-container {
  padding-bottom: 24px !important;
}

/* AI助手卡片滚动区域样式 */
.ai-chat-container {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.ai-chat-content {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 12px !important;
  max-height: 100% !important;
}

/* AI助手输入区域专用样式 - 防止全局样式覆盖 */
.ai-assistant-input-container {
  padding: 16px !important;
  padding-bottom: 24px !important;
  flex-shrink: 0 !important;
  border-top: 1px solid var(--color-gray-200) !important;
  background: #ffffff !important;
}

/* 防止滚动闪烁的样式 */
.scroll-container {
  will-change: scroll-position !important;
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  /* 添加硬件加速 */
  -webkit-transform: translate3d(0, 0, 0) !important;
  transform: translate3d(0, 0, 0) !important;
}

/* 优化AI助手区和客户聊天区的渲染性能 */
.ai-chat-scroll-container,
.chat-messages-scroll-container {
  contain: layout style paint !important;
  isolation: isolate !important;
  /* 防止重排和重绘 */
  will-change: auto !important;
  /* 优化滚动性能 */
  -webkit-overflow-scrolling: touch !important;
  /* 硬件加速 */
  -webkit-transform: translate3d(0, 0, 0) !important;
  transform: translate3d(0, 0, 0) !important;
}

/* 流式内容渲染优化 */
.streaming-content {
  /* 防止内容闪烁 */
  contain: layout style paint !important;
  /* 硬件加速 */
  -webkit-transform: translate3d(0, 0, 0) !important;
  transform: translate3d(0, 0, 0) !important;
  /* 优化重绘 */
  will-change: contents !important;
}

/* Markdown内容渲染优化 */
.markdown-content {
  /* 防止内容闪烁 */
  contain: layout style paint !important;
  /* 硬件加速 */
  -webkit-transform: translate3d(0, 0, 0) !important;
  transform: translate3d(0, 0, 0) !important;
  /* 优化重绘 */
  will-change: contents !important;
  /* 防止文本选择时的闪烁 */
  -webkit-user-select: text !important;
  user-select: text !important;
}

/* 消息气泡渲染优化 */
.message-bubble {
  /* 防止重排和重绘 */
  contain: layout style paint !important;
  /* 硬件加速 */
  -webkit-transform: translate3d(0, 0, 0) !important;
  transform: translate3d(0, 0, 0) !important;
  /* 优化渲染 */
  will-change: auto !important;
}

.ai-feature-toggles {
  margin-bottom: 16px !important;
}

/* 修复被 tabpane last-child 规则覆盖的问题 */
.conversation-page .right-panel .ant-tabs-tabpane > div > div.ai-assistant-input-container {
  padding-bottom: 24px !important;
  margin-bottom: 0 !important;
}

.conversation-page .right-panel .ant-tabs-tabpane .ai-feature-toggles {
  margin-bottom: 16px !important;
}

/* 更强力的覆盖规则 - 针对AI Copilot tab的最后一个子元素 */
.conversation-page .right-panel .ant-tabs-tabpane[aria-hidden="false"] > div > div:last-child.ai-assistant-input-container {
  padding-bottom: 24px !important;
  margin-bottom: 0 !important;
}

/* 客户端测试页面样式 */
.client-test-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  padding: 20px 0;
}

.page-header {
  text-align: left;
  margin-bottom: 24px;
}

.client-selection-card, .current-client-card {
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(80,120,200,0.08);
  background: #fff;
}

.client-list.custom-scroll {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.client-item {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.client-item.active {
  background: linear-gradient(90deg, #e0e7ff 0%, #f0f7ff 100%);
  box-shadow: 0 2px 8px rgba(80,120,200,0.10);
  border: 1.5px solid #3b82f6;
}

.client-item:hover {
  background: #f0f7ff;
}

.client-avatar {
  margin-right: 12px;
  background: #e0e7ff;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  margin-bottom: 2px !important;
  font-weight: 600;
}

.client-details {
  font-size: 13px;
  color: #888;
}

.client-tags {
  margin-top: 4px;
}

.current-client-info {
  padding: 8px 0 0 0;
}

.current-client-avatar {
  background: #c7d2fe;
}

.mobile-chat-container {
  margin-top: 18px;
  background: #f8fafc;
  border-radius: 16px;
  box-shadow: 0 2px 12px 0 rgba(80,120,200,0.06);
  padding: 0 0 8px 0;
}

.mobile-chat-header {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 18px 8px 18px;
  background: #fff;
  border-radius: 16px 16px 0 0;
}

.mobile-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.connection-status {
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  background: #d1d5db;
  display: inline-block;
}

.status-dot.connected {
  background: #22c55e;
}

.status-dot.disconnected {
  background: #f87171;
}

.mobile-messages-area {
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 16px 12px 0 12px;
  background: transparent;
}

.mobile-messages-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-message-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mobile-user-message {
  align-items: flex-end;
}

.mobile-message-bubble {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(80,120,200,0.08);
  font-size: 14px;
  margin-bottom: 2px;
  word-break: break-all;
}

.mobile-user-bubble {
  background: linear-gradient(90deg, #a1c4fd 0%, #c2e9fb 100%);
  color: #222;
  border-bottom-right-radius: 6px;
  margin-left: auto;
}

.mobile-advisor-bubble {
  background: #fff;
  border: 1.5px solid #a1c4fd;
  color: #1a1a1a;
  border-bottom-left-radius: 6px;
  margin-right: auto;
}

.mobile-message-time {
  font-size: 11px;
  color: #b0b0b0;
  margin-top: 2px;
}

.mobile-input-area {
  padding: 10px 12px 0 12px;
  background: transparent;
}

.mobile-input-container {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 1px 4px rgba(80,120,200,0.06);
  padding: 4px 10px 4px 16px;
  border: 1.5px solid #e0e7ff;
  transition: border 0.2s;
}

.mobile-message-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  font-size: 15px;
  border-radius: 20px;
  box-shadow: none !important;
  outline: none !important;
}

.mobile-message-input:focus {
  border: none !important;
  outline: none !important;
}

.send-btn {
  margin-left: 8px;
  background: linear-gradient(90deg, #a1c4fd 0%, #c2e9fb 100%);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(80,120,200,0.10);
  transition: background 0.2s;
}

.send-btn:disabled {
  background: #e0e7ef;
  color: #b0b0b0;
}

.quick-replies-container {
  padding: 10px 18px 6px 18px;
  background: #f8fafc;
  border-radius: 0 0 16px 16px;
  border-top: 1px solid #e5e7eb;
}

.quick-replies-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-reply-btn {
  border-radius: 18px !important;
  background: #fff !important;
  border: 1.5px solid #a1c4fd !important;
  color: #1a1a1a !important;
  box-shadow: 0 1px 4px rgba(80,120,200,0.06) !important;
  font-size: 13px !important;
  padding: 4px 14px !important;
  transition: background 0.2s, border 0.2s;
}

.quick-reply-btn:hover {
  background: #e0e7ff !important;
  border-color: #3b82f6 !important;
}

.mobile-empty-state, .empty-client-info {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: #b0b0b0;
  font-size: 16px;
  opacity: 0.85;
  flex-direction: row;
}

@media (max-width: 900px) {
  .client-test-page { padding: 8px 0; }
  .client-selection-card, .current-client-card { margin-bottom: 12px; }
  .mobile-chat-container { margin-top: 8px; }
  .mobile-messages-area { max-height: 180px; }
}

/* Dashboard 特定样式 - 移除对会话页面的影响 */
.dashboard-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  box-shadow: var(--shadow-flat-lg) !important;
}

.dashboard-metric-card {
  border: none !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-flat-lg) !important;
  background: white !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden !important;
  position: relative !important;
}

.dashboard-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.dashboard-metric-card:hover {
  transform: translateY(-4px) scale(1.02) !important;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1) !important;
}

.dashboard-metric-card .ant-statistic-title {
  font-weight: 600 !important;
  color: var(--gray-600) !important;
  margin-bottom: 8px !important;
}

.dashboard-metric-card .ant-statistic-content {
  font-weight: 700 !important;
}

/* Dashboard页面专用的梯度卡片样式 */
.dashboard-layout .dashboard-metric-card,
.dashboard-layout .ant-card.bg-gradient-to-br {
  background: transparent !important;
}

.dashboard-layout .dashboard-metric-card .ant-card-body,
.dashboard-layout .bg-gradient-to-br .ant-card-body {
  background: transparent !important;
  color: white !important;
}

.dashboard-layout .bg-gradient-to-br.from-emerald-400.to-emerald-600 {
  background: linear-gradient(135deg, #34d399, #059669) !important;
  color: white !important;
}

.dashboard-layout .bg-gradient-to-br.from-blue-400.to-blue-600 {
  background: linear-gradient(135deg, #60a5fa, #2563eb) !important;
  color: white !important;
}

.dashboard-layout .bg-gradient-to-br.from-red-400.to-red-600 {
  background: linear-gradient(135deg, #f87171, #dc2626) !important;
  color: white !important;
}

.dashboard-layout .bg-gradient-to-br.from-purple-400.to-purple-600 {
  background: linear-gradient(135deg, #a78bfa, #7c3aed) !important;
  color: white !important;
}

/* 仅在Dashboard页面确保梯度卡片内的文字是白色 */
.dashboard-layout .bg-gradient-to-br * {
  color: white !important;
}

/* 任务卡片动画 */
.task-item {
  transition: all 0.2s ease !important;
  border-radius: var(--radius-md) !important;
  padding: 12px !important;
  cursor: pointer !important;
}

.task-item:hover {
  transform: translateX(4px) !important;
  box-shadow: var(--shadow-flat-md) !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .dashboard-metric-card {
    margin-bottom: 16px !important;
  }
  
  .custom-scrollbar {
    max-height: 400px !important;
  }
  
  .ant-table {
    font-size: 12px !important;
  }
  
  .ant-card-head-title {
    font-size: 14px !important;
  }
}

/* 加载动画 */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* 主题色变量（支持深色模式扩展） */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
  }
}

/* Dashboard 现代化设计系统 */

/* 指标卡片样式 */
.metric-card {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.3s ease !important;
  background: white !important;
  overflow: hidden !important;
  position: relative !important;
}

.metric-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
}

.metric-card-green::before {
  background: #10b981;
}

.metric-card-blue::before {
  background: #3b82f6;
}

.metric-card-orange::before {
  background: #f59e0b;
}

.metric-card-purple::before {
  background: #8b5cf6;
}

.metric-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.metric-card-green .metric-icon {
  background: #ecfdf5;
  color: #059669;
}

.metric-card-blue .metric-icon {
  background: #eff6ff;
  color: #2563eb;
}

.metric-card-orange .metric-icon {
  background: #fffbeb;
  color: #d97706;
}

.metric-card-purple .metric-icon {
  background: #f3e8ff;
  color: #7c3aed;
}

.metric-info {
  flex: 1;
  min-width: 0;
}

.metric-title {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: 6px;
}

.metric-subtitle {
  font-size: 12px;
  color: #9ca3af;
}

.metric-status {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online {
  background: #10b981;
  animation: pulse 2s infinite;
}

.status-dot.offline {
  background: #ef4444;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* 卡片头部样式 */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  font-size: 18px;
  color: #f59e0b;
}

.header-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.task-count,
.conversation-count {
  background: #f3f4f6;
  color: #6b7280;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.header-link {
  color: #3b82f6;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-link:hover {
  color: #1d4ed8;
}

/* 任务卡片样式 */
.task-card {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  background: white !important;
}

.task-card .ant-card-head {
  border-bottom: 1px solid #f3f4f6 !important;
  border-radius: 16px 16px 0 0 !important;
  background: #fafafa !important;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.task-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.task-urgent {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.task-important {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.task-normal {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.task-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.task-icon {
  font-size: 16px;
}

.task-urgent .task-icon {
  color: #dc2626;
}

.task-important .task-icon {
  color: #d97706;
}

.task-normal .task-icon {
  color: #2563eb;
}

.task-text {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.task-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.task-badge.urgent {
  background: #dc2626;
  color: white;
}

.task-badge.important {
  background: #d97706;
  color: white;
}

.task-badge.normal {
  background: #2563eb;
  color: white;
}

/* 会话卡片样式 */
.conversation-card {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  background: white !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.conversation-card .ant-card-head {
  border-bottom: 1px solid #f3f4f6 !important;
  border-radius: 16px 16px 0 0 !important;
  background: white !important;
  flex: none !important;
}

.conversation-card .ant-card-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 24px !important;
}

.conversation-card .header-icon {
  color: #3b82f6;
}

/* 自适应Dashboard布局 */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0 16px;
  background: #f8fafc;
  gap: 16px;
  overflow: hidden;
}

.dashboard-header {
  flex: none;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.dashboard-header-content {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.dashboard-title-section {
  flex: 1;
}

.dashboard-button-section {
  flex: none;
  align-self: flex-start;
}

.dashboard-content {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.dashboard-metrics {
  flex: none;
}

.dashboard-tasks {
  flex: none;
}

.dashboard-conversations {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dashboard-conversations .conversation-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.dashboard-conversations .conversation-card .ant-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}

/* 响应式断点调整 */
@media (max-width: 1440px) {
  .dashboard-layout {
    padding: 20px;
    gap: 20px;
  }
  
  .dashboard-content {
    gap: 16px;
  }
}

@media (max-width: 1200px) {
  .dashboard-layout {
    padding: 16px;
    gap: 16px;
  }
  
  .dashboard-header-content {
    padding: 20px;
    gap: 16px;
  }
  
  .dashboard-content {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .dashboard-layout {
    padding: 12px;
    gap: 12px;
    height: 100vh;
  }
  
  .dashboard-header-content {
    padding: 16px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .dashboard-button-section {
    align-self: flex-end;
  }
  
  .dashboard-content {
    gap: 12px;
  }
  
  .dashboard-conversations {
    flex: 1;
  }
  
  .dashboard-header h2 {
    font-size: 18px !important;
    margin-bottom: 4px !important;
  }
}

@media (max-width: 576px) {
  .dashboard-layout {
    padding: 8px;
    gap: 8px;
  }
  
  .dashboard-header-content {
    padding: 12px;
    gap: 8px;
  }
  
  .dashboard-header h2 {
    font-size: 16px !important;
  }
  
  .dashboard-conversations {
    flex: 1;
  }
}

/* 小屏幕优化 */
@media (max-height: 800px) {
  .dashboard-layout {
    gap: 16px;
  }
  
  .dashboard-content {
    gap: 12px;
  }
  
  .metric-card .ant-card-body {
    padding: 16px !important;
  }
  
  .task-card .ant-card-body {
    padding: 16px !important;
  }
}

@media (max-height: 600px) {
  .dashboard-layout {
    gap: 12px;
    padding: 16px;
  }
  
  .dashboard-content {
    gap: 8px;
  }
  
  .metric-card .ant-card-body {
    padding: 12px !important;
  }
  
  .metric-value {
    font-size: 24px !important;
  }
}

/* 投资策略卡片样式 - 参考营销卡片设计 */
.strategy-card-container {
  border-radius: var(--radius-md) !important;
  margin-bottom: 12px !important;
  box-shadow: var(--shadow-flat-sm) !important;
  transition: all 0.2s ease !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
  padding: 14px !important;
  position: relative !important;
}

.strategy-card-container:hover {
  box-shadow: var(--shadow-flat-md) !important;
  transform: translateY(-1px) !important;
}

/* 策略卡片标题 */
.strategy-card-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--color-gray-800) !important;
  line-height: 1.4 !important;
  margin-bottom: 0 !important;
}

/* 策略卡片描述 */
.strategy-card-description {
  font-size: 12px !important;
  color: var(--color-gray-600) !important;
  line-height: 1.4 !important;
  margin-bottom: 12px !important;
}

/* 推荐标签样式 */
.strategy-recommended-tag {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 500 !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  animation: pulse 2s ease-in-out infinite !important;
}

/* 资产配置信息区域 */
.strategy-allocation-info {
  margin-top: 12px !important;
  padding: 12px !important;
  background: #ffffff !important;
  border-radius: 6px !important;
  border: 1px solid rgba(59, 130, 246, 0.1) !important;
  box-shadow: var(--shadow-flat-sm) !important;
}

/* 配置网格布局 */
.allocation-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

/* 配置项样式 */
.allocation-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 6px 8px !important;
  background: #f8fafc !important;
  border-radius: 4px !important;
  border: 1px solid #e2e8f0 !important;
}

/* 配置标签 */
.allocation-label {
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

/* 配置数值 */
.allocation-value {
  font-size: 12px !important;
  color: #1e40af !important;
  font-weight: 600 !important;
}

/* 删除按钮样式 - 右下角位置 */
.strategy-remove-button-corner {
  position: absolute !important;
  bottom: 8px !important;
  right: 8px !important;
  color: #ef4444 !important;
  font-size: 12px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid #fecaca !important;
  background: #fef2f2 !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
}

.strategy-remove-button-corner:hover {
  color: #dc2626 !important;
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  transform: scale(1.1) !important;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2) !important;
}

.strategy-remove-button-corner:focus {
  color: #dc2626 !important;
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

/* 数据分析页面Tab样式优化 */
.analytics-tabs {
  background: #ffffff !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-flat-sm) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.analytics-tabs .ant-tabs-nav {
  background: #f8fafc !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border-bottom: 1px solid var(--color-gray-200) !important;
}

.analytics-tabs .ant-tabs-tab {
  font-weight: 500 !important;
  color: var(--color-gray-600) !important;
  margin: 0 8px 0 0 !important;
  padding: 16px 20px !important;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  border: none !important;
  background: transparent !important;
  transition: all 0.2s ease !important;
}

.analytics-tabs .ant-tabs-tab:hover {
  color: var(--color-primary-600) !important;
  background: rgba(59, 130, 246, 0.05) !important;
}

.analytics-tabs .ant-tabs-tab-active {
  color: var(--color-primary-600) !important;
  background: #ffffff !important;
  font-weight: 600 !important;
  border-bottom: 2px solid var(--color-primary-500) !important;
}

.analytics-tabs .ant-tabs-ink-bar {
  background: var(--color-primary-500) !important;
  height: 2px !important;
}

.analytics-tabs .ant-tabs-content-holder {
  background: #ffffff !important;
  padding: 24px !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

.analytics-tabs .ant-tabs-content {
  height: auto !important;
}

.analytics-tabs .ant-tabs-tabpane {
  height: auto !important;
}

/* 数据分析页面卡片样式微调 */
.analytics-tabs .ant-card {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--color-gray-200) !important;
  box-shadow: var(--shadow-flat-sm) !important;
  transition: all 0.2s ease !important;
}

.analytics-tabs .ant-card:hover {
  box-shadow: var(--shadow-flat-md) !important;
  transform: translateY(-1px) !important;
}

.analytics-tabs .ant-card-head {
  border-bottom: 1px solid var(--color-gray-200) !important;
  background: #fafafa !important;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.analytics-tabs .ant-card-head-title {
  font-weight: 500 !important;
  color: var(--color-gray-800) !important;
  font-size: 14px !important;
}

.analytics-tabs .ant-alert {
  border-radius: var(--radius-md) !important;
  border: 1px solid transparent !important;
  box-shadow: var(--shadow-flat-sm) !important;
  transition: all 0.2s ease !important;
}

.analytics-tabs .ant-alert:hover {
  box-shadow: var(--shadow-flat-md) !important;
  transform: translateY(-1px) !important;
}

